//
//  YueZhiCell.m
//  LaSaCivilAffairsDepartment
//
//  Created by 姜晓延 on 2019/8/21.
//  Copyright © 2019 wpkj. All rights reserved.
//

#import "YueZhiCell.h"

@implementation YueZhiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)chooseBtncliled:(UIButton *)sender {
    
    if (!sender.selected) {
        if (self.xuanzhongbtnclicked) {
            self.xuanzhongbtnclicked(sender.selected);
        }
        sender.selected = !sender.selected;
    }
    
}


- (void)configDict:(NSDictionary *)dict{
    self.contentDict = dict;
    self.titlelabel.text = [ValidateUtils validateNull:dict[@"fileTitle"]];
    self.countLabel.text = [NSString stringWithFormat:@"已读情况%d/%@",[ValidateUtils validateNull:dict[@"toUserNum"]].intValue - [ValidateUtils validateNull:dict[@"unReadNum"]].intValue,[ValidateUtils validateNull:dict[@"toUserNum"]]];
    self.numlabel.text = dict[@"fileNum"];
    if ([[ValidateUtils validateNull:dict[@"isFiling"]] isEqualToString:@"0"]) {
        self.statuslabel.text = @"未归档";
    }else {
        self.statuslabel.text = @"已归档";
    }
    if ([dict[@"isSelect"] isEqualToString:@"1"]) {
        self.chooseBtn.selected = YES;
    }else{
        self.chooseBtn.selected = NO;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
